package cn.qiao.dubbo.provider.controller;

import cn.qiao.dubbo.UserService;
import cn.qiao.dubbo.provider.service.BaseService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * desc:
 *
 * @author qiao
 * @date 2023年05月10日 21:43
 */
@RestController
@RequestMapping("/goods")
public class UserController {

    @Reference //使用dubbo中的@Reference注解
    private UserService userService;
    @Autowired
    private BaseService baseService;


    @RequestMapping("/get")
    public Object getGoods() {
        return userService.getCount();
    }


    @RequestMapping("/demo")
    public Object demo() {
        return baseService.demo();
    }


}
